package a.f.l;

import a.a.hb;
import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.e;
import a.c.j;
import a.c.k;
import a.c.m;
import a.c.n;
import a.c.q;
import a.c.v;
import a.c.x;
import a.c.z;
import a.f.*;
import a.f.c.i;
import a.f.o;
import a.i.l;

import java.awt.geom.Point2D;
import java.util.*;

import a.f.l.p;

class p
{
  private static final String a = "y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY";
  private final g b;
  private final vc c;
  private Map e;
  private double f;
  private int g;
  private double h;
  
  p(vc paramvc)
  {
    this.c = paramvc;
    this.b = a(paramvc);
    if (this.b == null) {
      throw new IllegalArgumentException("No OrthogonalEdgeRouter set as core layouter.");
    }
  }
  
  double a()
  {
    return this.f;
  }
  
  void a(double paramDouble)
  {
    this.f = paramDouble;
  }
  
  int b()
  {
    return this.g;
  }
  
  void a(int paramInt)
  {
    this.g = paramInt;
  }
  
  double d()
  {
    return this.h;
  }
  
  void b(double paramDouble)
  {
    this.h = paramDouble;
  }
  
  bb a(b.d_ paramd_, List paramList)
  {
    int k = g.Cc;
    int j = g.Bc;
    this.b.f(false);
    o localo = paramd_.d();
    this.e = new HashMap();
    k localk = localo.c(i.a);
    if (k == 0) {
      if (localk != null)
      {
        localObject = new a.i.p()
        {
          private final k val$oldNodeID;
          
          public Object get(Object paramAnonymousObject)
          {
            Object localObject = this.val$oldNodeID.get(paramAnonymousObject);
            if (g.Cc == 0) {}
            return localObject != null ? localObject : paramAnonymousObject;
          }
        };
        localo.a(i.a, (k)localObject);
      }
    }
    Object localObject = localo.c(bd.a);
    x localx = paramd_.b();
    localo.a(bd.a, localx);
    int i = paramd_.j().size() + paramList.size();
    Iterator localIterator = paramList.iterator();
    ob localob;
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      localob = (ob)localIterator.next();
      this.e.put(localob.g(), localob);
      if (k != 0) {
        break label216;
      }
      localx.a(localob.g(), a(localob, i));
      if (j != 0) {
        break label214;
      }
    } while (j == 0);
    c(paramd_, paramList);
    if (k == 0)
    {
      a(localo, paramList);
      label214:
      if (localk != null) {
        label216:
        localo.a(i.a, localk);
      }
      localIterator = paramList.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        localob = (ob)localIterator.next();
        if (k != 0) {
          break label300;
        }
        localx.a(localob.g(), null);
        if (j != 0) {
          break label298;
        }
      } while (j == 0);
      if (k == 0)
      {
        localo.j(bd.a);
        label298:
        label300:
        if (localObject == null) {}
      }
      else
      {
        localo.a(bd.a, (k)localObject);
      }
      c(localo, paramList);
    }
    return d(localo, paramList);
  }
  
  private void c(b.d_ paramd_, List paramList)
  {
    int k = g.Cc;
    int j = g.Bc;
    if (paramList.size() == 0) {
      return;
    }
    o localo = paramd_.d();
    k localk = localo.c(ad.r);
    n localn1 = localo.C();
    localo.a(ad.r, localn1);
    x localx = localo.B();
    n localn2 = localo.C();
    n localn3 = localo.C();
    ab localab = new ab();
    bb localbb = new bb();
    int i = 0;
    Object localObject2 = paramList.iterator();
    if (((Iterator)localObject2).hasNext())
    {
      if (k != 0) {}
    }
    else {
      while (k != 0)
      {
        localObject3 = ((ob)((Iterator)localObject2).next()).g();
        localx.a(localObject3, paramList.size() - i);
        if (j != 0) {
          break label174;
        }
        localbb.add(localObject3);
        i++;
        if (j == 0) {
          break;
        }
      }
    }
    label174:
    Object localObject1 = paramd_.j().iterator();
    break label210;
    label181:
    if (((Iterator)localObject1).hasNext()) {}
    label210:
    do
    {
      localObject2 = (b.c_)((Iterator)localObject1).next();
      localObject3 = localbb.l();
      if (!((a.c.w)localObject3).e()) {
        break label181;
      }
      localObject4 = ((a.c.w)localObject3).d();
      localObject5 = localo.a((e)localObject4, ((b.c_)localObject2).b());
      localab.add(localObject5);
      localObject6 = new c_((d)localObject5, (b.c_)localObject2, localx.getInt(localObject4), null);
      localn2.a(localObject5, localObject6);
      localn3.a(localObject5, true);
      localn1.a(localObject5, ((b.c_)localObject2).d());
      ((a.c.w)localObject3).f();
      if (k == 0)
      {
        if (((k == 0) && (j != 0)) || ((k == 0) && (j != 0))) {
          break label375;
        }
        if (j == 0) {
          break;
        }
        this.b.b((byte)2);
        this.b.b("y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY");
      }
    } while (k != 0);
    localo.a("y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY", localn3);
    label375:
    localObject1 = new a.i.y(localo);
    ((a.i.y)localObject1).a(localbb.l());
    localObject2 = localbb.l();
    do
    {
      if (!((a.c.w)localObject2).e()) {
        break;
      }
      localObject3 = ((a.c.w)localObject2).d();
      ((a.i.y)localObject1).a((e)localObject3, true);
      this.c.doLayout(localo);
      ((a.i.y)localObject1).a((e)localObject3);
      ((a.c.w)localObject2).f();
      if ((k == 0) && (j != 0)) {
        break label503;
      }
    } while (j == 0);
    ((a.i.y)localObject1).g();
    localo.a(localn3);
    localo.a(localn1);
    localo.j("y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY");
    if (k == 0)
    {
      localo.j(ad.r);
      label503:
      if (localk == null) {}
    }
    else
    {
      localo.a(ad.r, localk);
    }
    localObject2 = localab.l();
    do
    {
      if (!((m)localObject2).e()) {
        break;
      }
      localObject3 = ((m)localObject2).a();
      localObject4 = (c_)localn2.get(localObject3);
      ((c_)localObject4).f = a(localo, (d)localObject3, false);
      ((m)localObject2).f();
    } while (j == 0);
    localObject2 = new Comparator()
    {
      private final n val$edgeDataMap;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        p.c_ localc_1 = (p.c_)this.val$edgeDataMap.get(paramAnonymousObject1);
        p.c_ localc_2 = (p.c_)this.val$edgeDataMap.get(paramAnonymousObject2);
        int i = b.b(localc_1.f, localc_2.f);
        if (g.Cc == 0) {
          if (i != 0) {
            return i;
          }
        }
        return l.a(localc_2.c, localc_1.c);
      }
    };
    Object localObject3 = paramd_.j().iterator();
    break label645;
    label606:
    if (((Iterator)localObject3).hasNext()) {}
    label645:
    while (k != 0)
    {
      localObject4 = (b.c_)((Iterator)localObject3).next();
      ((b.c_)localObject4).a((Comparator)localObject2);
      localObject5 = ((b.c_)localObject4).h().f();
      if (localObject5 == null) {
        break label606;
      }
      ((c_)localn2.get(((v)localObject5).c())).d = ((v)localObject5);
      localObject5 = ((v)localObject5).a();
      if ((k == 0) && ((j == 0) && (j == 0))) {
        break;
      }
    }
    localObject3 = localo.B();
    Object localObject4 = paramd_.j().iterator();
    if (((Iterator)localObject4).hasNext()) {}
    Object localObject7;
    while (k != 0)
    {
      localObject5 = (b.c_)((Iterator)localObject4).next();
      localObject6 = ((b.c_)localObject5).i().e();
      localObject7 = (Set)((x)localObject3).get(localObject6);
      if (k == 0) {
        if (localObject7 == null)
        {
          localObject7 = new HashSet();
          ((x)localObject3).a(localObject6, localObject7);
        }
      }
      ((Set)localObject7).add(((b.c_)localObject5).b());
      if (j == 0) {
        break;
      }
    }
    localObject4 = new Comparator()
    {
      private final x val$backboneBestNode;
      private final x val$backboneRank;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int k = g.Cc;
        int j = g.Bc;
        Set localSet1 = (Set)this.val$backboneBestNode.get(paramAnonymousObject1);
        Set localSet2 = (Set)this.val$backboneBestNode.get(paramAnonymousObject2);
        int i;
        if (k == 0) {
          if (localSet1 == null)
          {
            if (k != 0) {
              break label72;
            }
            if (localSet2 == null)
            {
              i = 0;
              if (k != 0) {
                break label130;
              }
              if (j == 0) {
                break label128;
              }
            }
          }
        }
        label72:
        if (k == 0) {
          if (localSet1 != null)
          {
            if (k != 0) {
              break label119;
            }
            if (localSet2 != null)
            {
              i = l.a(localSet1.size(), localSet2.size());
              if (k != 0) {
                break label130;
              }
              if (j == 0) {
                break label128;
              }
            }
          }
        }
        label119:
        return localSet1 == null ? -1 : 1;
        label128:
        label130:
        if (k == 0) {
          if (i != 0) {
            return i;
          }
        }
        return l.a(this.val$backboneRank.getInt(paramAnonymousObject1), this.val$backboneRank.getInt(paramAnonymousObject2));
      }
    };
    localbb.a((Comparator)localObject4);
    label922:
    Object localObject8;
    Object localObject9;
    label1078:
    do
    {
      if (localbb.size() <= 1) {
        break;
      }
      localObject5 = localbb.m();
      localObject6 = (Set)((x)localObject3).get(localObject5);
      if (k == 0) {
        if (localObject6 != null)
        {
          if (k == 0) {
            if (((Set)localObject6).size() >= this.g) {
              break;
            }
          }
        }
        else
        {
          if (k != 0) {
            break label922;
          }
          localbb.o();
        }
      }
      if (localObject6 != null) {
        ((Set)localObject6).clear();
      }
      localObject7 = ((e)localObject5).n();
      do
      {
        do
        {
          if (!((m)localObject7).e()) {
            break label1078;
          }
          localObject8 = ((m)localObject7).a();
          localObject9 = (c_)localn2.get(localObject8);
          boolean bool = localObject8.equals(((c_)localObject9).a.i());
          localo.a((d)localObject8);
          ((c_)localObject9).a();
          if (j != 0) {
            break;
          }
          if (bool)
          {
            d locald = ((c_)localObject9).a.i();
            Object localObject10 = (Set)((x)localObject3).get(localObject5);
            if (k == 0) {
              if (localObject10 == null)
              {
                localObject10 = new HashSet();
                ((x)localObject3).a(localObject5, localObject10);
              }
            }
            ((Set)localObject10).add(((c_)localObject9).a.b());
          }
          ((m)localObject7).f();
        } while (j == 0);
        localbb.a((Comparator)localObject4);
      } while (k != 0);
    } while (j == 0);
    Object localObject5 = new HashMap();
    Object localObject6 = paramd_.j().iterator();
    label1224:
    label1227:
    do
    {
      do
      {
        do
        {
          if (!((Iterator)localObject6).hasNext()) {
            break label1227;
          }
          localObject7 = (b.c_)((Iterator)localObject6).next();
          localObject8 = b.a(localo.s(((b.c_)localObject7).i()));
          if (j != 0) {
            break label1268;
          }
          if (!((Map)localObject5).containsKey(localObject8)) {
            break;
          }
          a(localo, new b.c_[] { (b.c_)((Map)localObject5).get(localObject8), localObject7 }, (Map)localObject5, localn2);
          if (k != 0) {
            break label1224;
          }
        } while (j == 0);
        ((Map)localObject5).put(localObject8, localObject7);
      } while (j == 0);
      localo.a(localn2);
      localo.a(localx);
      localo.a((x)localObject3);
    } while (k != 0);
    localObject6 = paramd_.j().iterator();
    label1268:
    do
    {
      for (;;)
      {
        if (((Iterator)localObject6).hasNext())
        {
          localObject7 = (b.c_)((Iterator)localObject6).next();
          localObject8 = ((b.c_)localObject7).h().o();
          ((b.c_)localObject7).a(b.a(localo.s((d)localObject8)));
          localObject9 = ((b.c_)localObject7).g();
          if (((m)localObject9).e())
          {
            localo.a(((m)localObject9).a());
            ((m)localObject9).f();
            if (k != 0) {
              break label1392;
            }
            if ((k != 0) || (j == 0))
            {
              if (k != 0) {
                break label1392;
              }
              if (j != 0) {
                break label1385;
              }
              if (j == 0) {
                break;
              }
            }
          }
        }
      }
    } while (k != 0);
    localObject6 = paramList.iterator();
    label1385:
    label1392:
    do
    {
      do
      {
        do
        {
          if (!((Iterator)localObject6).hasNext()) {
            break;
          }
          localObject7 = (ob)((Iterator)localObject6).next();
        } while (((ob)localObject7).g().c() != 0);
        this.e.remove(((ob)localObject7).g());
        localo.a(((ob)localObject7).g());
        ((Iterator)localObject6).remove();
      } while (k != 0);
    } while (j == 0);
  }
  
  private static void a(o paramo, b.c_[] paramArrayOfc_, Map paramMap, n paramn)
  {
    int k = g.Cc;
    int j = g.Bc;
    boolean[] tmp13_11 = new boolean[2];
    if (k == 0) {
      if (!paramArrayOfc_[0].j()) {
        if (k != 0) {
          break label46;
        }
      }
    }
    label46:
    tmp13_11[0] = (c(paramo, paramMap, paramArrayOfc_[0]) ? 1 : 0);
    boolean[] tmp51_13 = tmp13_11;
    if (k == 0) {
      if (!paramArrayOfc_[1].j()) {
        if (k != 0) {
          break label84;
        }
      }
    }
    label84:
    tmp51_13[1] = (c(paramo, paramMap, paramArrayOfc_[1]) ? 1 : 0);
    boolean[] arrayOfBoolean = tmp51_13;
    if ((k != 0) || ((arrayOfBoolean[0] == 0) || ((k != 0) || (arrayOfBoolean[1] == 0))))
    {
      if (k == 0) {
        if (arrayOfBoolean[0] == 0)
        {
          if (k != 0) {
            break label205;
          }
          if (arrayOfBoolean[1] == 0)
          {
            if (k == 0)
            {
              if (a(paramArrayOfc_[0], paramn) < a(paramArrayOfc_[1], paramn))
              {
                a(paramo, paramMap, paramArrayOfc_[0]);
                if (k != 0) {
                  break label240;
                }
                if (j == 0) {
                  break label239;
                }
              }
              a(paramo, paramMap, paramArrayOfc_[1]);
            }
            if (k != 0) {
              break label240;
            }
            if (j == 0) {
              break label239;
            }
          }
        }
      }
      label205:
      if (k == 0)
      {
        if (arrayOfBoolean[0] == 0) {
          a(paramo, paramMap, paramArrayOfc_[0]);
        }
      }
      else
      {
        if (k != 0) {
          break label240;
        }
        if (j == 0) {
          break label239;
        }
      }
      a(paramo, paramMap, paramArrayOfc_[1]);
    }
    label239:
    label240:
    int i = 0;
    do
    {
      if (i >= paramArrayOfc_.length) {
        break;
      }
      b.c_ localc_ = paramArrayOfc_[i];
      paramMap.put(b.a(paramo.s(localc_.i())), localc_);
      i++;
    } while (j == 0);
  }
  
  private static double a(b.c_ paramc_, n paramn)
  {
    d locald1 = paramc_.i();
    d locald2 = (d)paramc_.h().get(1);
    return ((c_)paramn.get(locald2)).f - ((c_)paramn.get(locald1)).f;
  }
  
  private static void a(o paramo, Map paramMap, b.c_ paramc_)
  {
    int j = g.Cc;
    int i = g.Bc;
    a.d.w localw1 = b.a(paramo.s(paramc_.i()));
    Iterator localIterator = paramc_.h().iterator();
    do
    {
      do
      {
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          d locald = (d)localIterator.next();
          a.d.w localw2 = b.a(paramo.s(locald));
          if ((j == 0) && ((!localw1.equals(localw2)) && ((j == 0) && (!paramMap.containsKey(localw2))))) {
            break;
          }
        } while (!localIterator.hasNext());
        localIterator.remove();
      } while (j != 0);
    } while (i == 0);
  }
  
  private static boolean b(o paramo, Map paramMap, b.c_ paramc_)
  {
    int i = g.Cc;
    a.d.w localw1 = b.a(paramo.s(paramc_.i()));
    Object localObject = null;
    m localm = paramc_.f();
    while (localm.e())
    {
      d locald = localm.a();
      a.d.w localw2 = b.a(paramo.s(locald));
      if (i == 0)
      {
        if ((!localw1.equals(localw2)) && (!paramMap.containsKey(localw2)))
        {
          localObject = locald;
          break;
        }
        localm.f();
      }
    }
    if (i == 0)
    {
      if (localObject != null) {
        paramc_.h().a(localObject);
      }
    }
    else
    {
      paramMap.put(b.a(paramo.s(localObject)), paramc_);
      return true;
    }
    return false;
  }
  
  private static boolean c(o paramo, Map paramMap, b.c_ paramc_)
  {
    int j = g.Cc;
    int i = g.Bc;
    m localm = paramc_.g();
    a.d.w localw1 = b.a(paramo.s(paramc_.i()));
    do
    {
      if (!localm.e()) {
        break;
      }
      a.d.w localw2 = b.a(paramo.s(localm.a()));
      if (i != 0) {
        break label97;
      }
      if (!localw2.equals(localw1))
      {
        if (j != 0) {
          continue;
        }
        if (!paramMap.containsKey(localw2)) {
          return false;
        }
      }
      localm.f();
    } while (i == 0);
    label97:
    return true;
  }
  
  private void a(o paramo, Collection paramCollection)
  {
    int m = g.Cc;
    int k = g.Bc;
    if (paramCollection.size() < 2) {
      return;
    }
    n localn1 = paramo.C();
    q localq = new q();
    HashMap localHashMap = new HashMap();
    ob[] arrayOfob = new ob[paramCollection.size()];
    paramCollection.toArray(arrayOfob);
    e[] arrayOfe = new e[arrayOfob.length];
    int i = 0;
    Object localObject4;
    label267:
    label269:
    do
    {
      if (i >= arrayOfob.length) {
        break;
      }
      arrayOfe[i] = localq.i();
      if ((m == 0) && (k != 0)) {
        break label322;
      }
      int j = 0;
      do
      {
        if (j >= i) {
          break;
        }
        localObject2 = paramo.a(arrayOfob[j].g(), arrayOfob[i].g());
        localObject3 = b.a(arrayOfob[i].b(), arrayOfob[j].b(), true);
        if (m != 0) {
          break label269;
        }
        if (k != 0) {
          break label267;
        }
        if (localObject3 != null)
        {
          localObject4 = new a.d.w(((Point2D)localObject3).getX(), ((Point2D)localObject3).getY());
          paramo.c((d)localObject2, (a.d.w)localObject4);
          paramo.d((d)localObject2, (a.d.w)localObject4);
          if (m != 0) {
            continue;
          }
          if (k == 0) {}
        }
        else
        {
          localn1.a(localObject2, true);
        }
        localHashMap.put(localq.a(arrayOfe[j], arrayOfe[i]), localObject2);
        j++;
      } while (k == 0);
      if (m == 0) {
        i++;
      }
    } while (k == 0);
    this.b.b((byte)2);
    this.b.b("y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY");
    paramo.a("y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY", localn1);
    this.c.doLayout(paramo);
    paramo.j("y.layout.router.SingleBusRouter.BACKBONE_SUBGRAPH_DPKEY");
    if (m == 0) {
      paramo.a(localn1);
    }
    label322:
    n localn2 = localq.C();
    Object localObject1 = localq.w();
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      localn2.a(localObject2, a(paramo, (d)localHashMap.get(localObject2), true));
      ((m)localObject1).f();
    } while (k == 0);
    localObject1 = hb.a(localq, localn2);
    Object localObject2 = localq.C();
    b.a((j)localObject2, (z)localObject1);
    Object localObject3 = localq.w();
    do
    {
      if (!((m)localObject3).e()) {
        break;
      }
      localObject4 = ((m)localObject3).a();
      if ((m == 0) && (k != 0)) {
        return;
      }
      if (m == 0)
      {
        if (!((n)localObject2).getBool(localObject4)) {
          paramo.a((d)localHashMap.get(localObject4));
        }
        ((m)localObject3).f();
      }
    } while (k == 0);
    localq.a(localn2);
    if (m == 0) {
      localq.a((n)localObject2);
    }
  }
  
  private void c(o paramo, Collection paramCollection)
  {
    int k = g.Cc;
    int j = g.Bc;
    Iterator localIterator = paramCollection.iterator();
    label54:
    label56:
    label215:
    label622:
    label762:
    do
    {
      for (;;)
      {
        if (localIterator.hasNext())
        {
          ob localob = (ob)localIterator.next();
          double d = localob.e();
          m localm = localob.g().n();
          d locald;
          a.d.w[] arrayOfw;
          if (localm.e())
          {
            locald = localm.a();
            arrayOfw = paramo.n(locald).h();
          }
          int i;
          do
          {
            if (j == 0)
            {
              if (localob.a()) {
                if (k == 0)
                {
                  if (arrayOfw[1].a >= localob.b().b())
                  {
                    if (k != 0) {
                      break label215;
                    }
                    if (arrayOfw[1].a <= localob.b().e()) {}
                  }
                  else
                  {
                    arrayOfw[0] = new a.d.w(arrayOfw[0].a, d);
                    arrayOfw[1] = new a.d.w(arrayOfw[1].a, d);
                    paramo.a(locald, new a.d.y(arrayOfw));
                  }
                }
                else
                {
                  if (k != 0) {
                    break label417;
                  }
                  if (j == 0) {
                    break label408;
                  }
                }
              }
              if (k == 0) {
                if (!localob.a()) {
                  if (k == 0)
                  {
                    if (arrayOfw[1].b >= localob.b().c())
                    {
                      if (k != 0) {
                        break label341;
                      }
                      if (arrayOfw[1].b <= localob.b().f()) {}
                    }
                    else
                    {
                      arrayOfw[0] = new a.d.w(d, arrayOfw[0].b);
                      arrayOfw[1] = new a.d.w(d, arrayOfw[1].b);
                      paramo.a(locald, new a.d.y(arrayOfw));
                    }
                  }
                  else
                  {
                    if (k != 0) {
                      break label417;
                    }
                    if (j == 0) {
                      break label408;
                    }
                  }
                }
              }
              a.d.w localw1;
              if (localob.a())
              {
                localw1 = paramo.p(locald);
                paramo.a(locald, new a.d.w(localw1.a, 0.0D));
                if (k != 0) {
                  break label417;
                }
                if (j == 0) {}
              }
              else
              {
                localw1 = paramo.p(locald);
                paramo.a(locald, new a.d.w(0.0D, localw1.b));
              }
              localm.f();
              if (j == 0) {
                break label54;
              }
              if (k != 0) {
                break label56;
              }
              localm = localob.g().m();
            }
            if (!localm.e()) {
              break;
            }
            locald = localm.a();
            arrayOfw = paramo.n(locald).h();
            i = arrayOfw.length - 1;
          } while (k != 0);
          if (j == 0)
          {
            if (localob.a()) {
              if (k == 0)
              {
                if (arrayOfw[(i - 1)].a >= localob.b().b())
                {
                  if (k != 0) {
                    break label622;
                  }
                  if (arrayOfw[(i - 1)].a <= localob.b().e()) {}
                }
                else
                {
                  arrayOfw[i] = new a.d.w(arrayOfw[i].a, d);
                  arrayOfw[(i - 1)] = new a.d.w(arrayOfw[(i - 1)].a, d);
                  paramo.a(locald, new a.d.y(arrayOfw));
                }
              }
              else
              {
                if (k != 0) {
                  break label838;
                }
                if (j == 0) {
                  break label829;
                }
              }
            }
            if (k == 0) {
              if (!localob.a()) {
                if (k == 0)
                {
                  if (arrayOfw[(i - 1)].b >= localob.b().c())
                  {
                    if (k != 0) {
                      break label762;
                    }
                    if (arrayOfw[(i - 1)].b <= localob.b().f()) {}
                  }
                  else
                  {
                    arrayOfw[i] = new a.d.w(d, arrayOfw[i].b);
                    arrayOfw[(i - 1)] = new a.d.w(d, arrayOfw[(i - 1)].b);
                    paramo.a(locald, new a.d.y(arrayOfw));
                  }
                }
                else
                {
                  if (k != 0) {
                    break label838;
                  }
                  if (j == 0) {
                    break label829;
                  }
                }
              }
            }
            a.d.w localw2;
            if (localob.a())
            {
              localw2 = paramo.q(locald);
              paramo.b(locald, new a.d.w(localw2.a, 0.0D));
              if (k != 0) {
                break label838;
              }
              if (j == 0) {}
            }
            else
            {
              localw2 = paramo.q(locald);
              paramo.b(locald, new a.d.w(0.0D, localw2.b));
            }
            localm.f();
            if (j == 0) {
              break;
            }
          }
        }
      }
    } while (k != 0);
    label341:
  }
  
  private bb d(o paramo, Collection paramCollection)
  {
    int j = g.Cc;
    int i = g.Bc;
    bb localbb = new bb();
    Iterator localIterator = paramCollection.iterator();
    label26:
    label291:
    label373:
    do
    {
      Object localObject3;
      Object localObject4;
      do
      {
        if (!localIterator.hasNext()) {
          return localbb;
        }
        ob localob = (ob)localIterator.next();
        e locale1 = localob.g();
        do
        {
          if (locale1.e() == 0) {
            break label26;
          }
          Object localObject1 = new a.d.w(1.7976931348623157E+308D, 1.7976931348623157E+308D);
          Object localObject2 = new a.d.w(-1.797693134862316E+308D, -1.797693134862316E+308D);
          localObject3 = null;
          localObject4 = null;
          ab localab = new ab(locale1.l());
          m localm = localab.l();
          do
          {
            if (!localm.e()) {
              break label373;
            }
            d locald = localm.a();
            e locale2 = locald.a(locale1);
            if (i != 0) {
              break;
            }
            a.d.w localw = locald.e().equals(locale1) ? b.a(paramo.r(locald)) : b.a(paramo.s(locald));
            e locale3 = paramo.i();
            localbb.add(locale3);
            paramo.a(locale3, localw);
            if (j == 0) {
              if (locald.e().equals(locale1))
              {
                paramo.a(locald, locale3, locale2);
                paramo.a(locald, new a.d.w(0.0D, 0.0D));
                if (j == 0) {
                  if (i == 0) {
                    break label291;
                  }
                }
              }
              else
              {
                paramo.a(locald, locale2, locale3);
              }
            }
            paramo.b(locald, new a.d.w(0.0D, 0.0D));
            double d = b.a(localw, localob.a());
            if (j == 0) {
              if (d < b.a((a.d.w)localObject1, localob.a()))
              {
                localObject1 = localw;
                localObject3 = locale3;
              }
            }
            if (j == 0)
            {
              if (d > b.a((a.d.w)localObject2, localob.a()))
              {
                localObject2 = localw;
                localObject4 = locale3;
              }
              localm.f();
            }
          } while (i == 0);
          if (j != 0) {
            break;
          }
          if (localObject3 == null) {
            break label26;
          }
        } while (j != 0);
        if (j != 0) {
          break label414;
        }
      } while (localObject3.equals(localObject4));
      paramo.a(localObject3, localObject4);
    } while (i == 0);
    label414:
    return localbb;
  }
  
  private double a(o paramo, d paramd, boolean paramBoolean)
  {
    int i = g.Cc;
    double d1 = (i != 0) || ((!paramBoolean) && ((i != 0) || (((ob)this.e.get(paramd.e())).f()))) ? this.h : 0.0D;
    double d2 = paramo.e(paramd).a() * this.f;
    return paramo.n(paramd).m() + d2 + d1;
  }
  
  static bd a(ob paramob, int paramInt)
  {
    int i = g.Cc;
    bd localbd = new bd();
    if (i == 0)
    {
      if (paramob.a())
      {
        localbd.a(ad.a(0.5D * paramob.d(), 0.0D, 4), paramInt);
        localbd.a(ad.b(2), paramInt);
        localbd.a(ad.a(-0.5D * paramob.d(), 0.0D, 8), paramInt);
        if (i != 0) {
          break label144;
        }
        localbd.a(ad.b(1), paramInt);
        if (g.Bc == 0) {}
      }
      else
      {
        localbd.a(ad.b(4), paramInt);
        localbd.a(ad.a(0.0D, 0.5D * paramob.d(), 2), paramInt);
        localbd.a(ad.b(8), paramInt);
      }
    }
    else {
      localbd.a(ad.a(0.0D, -0.5D * paramob.d(), 1), paramInt);
    }
    label144:
    return localbd;
  }
  
  static g a(rc paramrc)
  {
    int j = g.Cc;
    int i = g.Bc;
    do
    {
      rc localrc = paramrc;
      while (i == 0)
      {
        if (!(localrc instanceof vc)) {
          break;
        }
        if (j == 0)
        {
          if ((localrc instanceof g)) {
            return (g)localrc;
          }
          localrc = ((vc)localrc).a();
        }
      }
    } while (j != 0);
    return null;
  }
  
  private static class c_
  {
    private final b.c_ a;
    private final int c;
    private v d;
    private double f;
    
    private c_(d paramd, b.c_ paramc_, int paramInt)
    {
      this.a = paramc_;
      this.c = paramInt;
      this.d = paramc_.a(paramd);
    }
    
    private void a()
    {
      this.a.a(this.d);
    }
    
    c_(d paramd, b.c_ paramc_, int paramInt, p.3 param3)
    {
      this(paramd, paramc_, paramInt);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.p

 * JD-Core Version:    0.7.0.1

 */